import React, { Component } from 'react'
import { Button, Divider, Statistic } from 'antd'
import './index.css'

export default class Count extends Component {

	state = {sum: 0}
	add = () => {
		this.setState({sum: this.state.sum + 1})
	}
	render() {
		return (
			<div className='count'>
				<Statistic title="当前的和" value={this.state.sum}/>
				<Divider />
				<Button type='primary' onClick={this.add}>点我+1</Button>
			</div>
		)
	}
}
